]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
status/volume: Use default color for muted microphone indicator
authorrevisto <therevisto@gmail.com>
Tue, 16 Dec 2025 15:58:59 +0000 (19:28 +0330)
committerFlorian Müllner <fmuellner@gnome.org>
Tue, 16 Dec 2025 16:25:28 +0000 (17:25 +0100)
The muted indicator status is currently hard to distinguish from the
unmuted one. As there is no privacy concern when muted, don't apply
the privacy-indicator styling in that state so the states become
more distinct.

Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/8077
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/4001>

js/ui/status/volume.js

index 7b944f6cada7190af40aa49a22339d84d4558360..4f57ebb3a0f075e6670f83652fa06761b784b4d5 100644 (file)
@@ -502,8 +502,6 @@ class InputIndicator extends VolumeIndicator {
     constructor() {
         super();
 
-        this._indicator.add_style_class_name('privacy-indicator');
-
         this._indicator.connect('scroll-event',
             (actor, event) => this._handleScrollEvent(this._input, event));
 
@@ -519,6 +517,7 @@ class InputIndicator extends VolumeIndicator {
 
             if (icon)
                 this._indicator.icon_name = icon;
+            this._updatePrivacyIndicator();
         });
 
         this._input.bind_property('visible',
@@ -530,6 +529,15 @@ class InputIndicator extends VolumeIndicator {
         this._onControlStateChanged();
     }
 
+    _updatePrivacyIndicator() {
+        // Muted microphone doesn't need privacy indicator (no privacy concern)
+        const {isMuted} = this._input._stream;
+        if (isMuted)
+            this._indicator.remove_style_class_name('privacy-indicator');
+        else
+            this._indicator.add_style_class_name('privacy-indicator');
+    }
+
     _onControlStateChanged() {
         if (this._control.get_state() === Gvc.MixerControlState.READY)
             this._readInput();